/**
 * 组件 - SKU列表（不参与wxss编译）
 * skusView.wxml
 * -----------------------------------
 * 18/03/29 Jerry 新增
 */

 @import '../pagingTip/pagingTip.less';

 .skus-view {

   .sku-item {
     display: inline-block;
     padding: 15rpx;
     width: 50%;
     box-sizing: border-box;
     border-bottom: solid 3rpx @color-gray-light;

     &:nth-child(1),
     &:nth-child(2) {
       border-top: solid 3rpx @color-gray-light;
     }

     &:nth-child(odd) {
       border-right: solid 3rpx @color-gray-light;
     }

     /* SKU主图 */
     .sku-img {
       display: flex;
       width: 100%;
       justify-content: center;

       image {
         width: 280rpx;
         height: 280rpx;
       }
     } /* .sku-img */

     /* SKU名称 */
     .sku-name {
       display: block;
       text-align: center;
       overflow:hidden; /* 超出一行文字自动隐藏 */
       text-overflow:ellipsis; /* 文字隐藏后添加省略号 */
       white-space:nowrap; /* 强制不换行 */
     } /* .sku-name */

     /* SKU单价 */
     .sku-price {
       display: block;
       padding-top: 5rpx;
       text-align: center;
       font-size: @text-size-l;
       color: @color-primary;
     } /* .sku-price */

     /* sku-item hover 样式 */
     &.sku-item-hover {

       .sku-img {
         opacity: .7;
       }
     } /* &.sku-item-hover */

   } /* .sku-item */

   /* 整行样式 */
   &.full-width {
 
     .sku-item {
       display: block;
       padding: 10rpx 0 0;
       width: 100%;
       border: none;
 
       .sku-img {
 
         image {
           width: 100%;
         }
 
       }
 
       &:first-child {
         padding-top: 0;
       }
 
     } /* .sku-item */
 
   } /* &.full-width */
 
 } /* .skus-view */
 